#pragma once
#include"Student.h"
#include"Order.h"
#include"Teacher.h"
#include"Manager.h"
#include<vector>
#include<map>
#include<iostream>
using namespace std;
class RoomOrderManager
{
public:
	RoomOrderManager();
	void showMenu(int type = 0);
	void showOrders(int type = 0);
	void checkOrder();
	void cancelOrder();
	bool Login(int type, string& loginName);
	void Logout();
	void save();
	void addAccount();
	void showAccount();
	void showRoom();
	void clearOrders();
	void applyOrder();
	void exitSys();
private:
	vector<User*>students;
	vector<User*>teachers;
	vector<Manager>managers;
	multimap<int, Order>orders;
	map<int, int>room;
	int curStuID;
	multimap<int, Order>::iterator findOrder();
	vector<User*>::iterator findUser(vector<User*>& users, int id);
	void showUser(vector<User*>& users);
};
